<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/amazeui.min.css" />
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/hy.admin.css" />
		<style type="text/css">
			.hy-js-fieldarea label{ border: 2px solid #ddd; width: 100%;background: #ddd;height: 40px;border-radius: 4px;line-height: 30px;padding-left: 10px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
		     .am-icon-photo{ cursor: pointer;}
		</style>
	</head>

	<body>
		<div class="am-container">
			<div class="am-g">
				<div class="am-form">
					<div class="am-form-group">
						<label for="doc-select-2">多选框(多选请CTRL+鼠标左键选择)</label>
						<select multiple="multiple" class="hy-js-chooseattr" id="doc-select-2">
							{foreach from=$attr_list item=item}
							<option value="{$item.id}">{$item.name}</option>
							{/foreach}

						</select>

					</div>
					<div class="am-form-group hy-js-attrlist">
						<p>属性列表：请勾选所需要的属性</p>
						{foreach from=$attr_list item=item}
						<div id="hy-js-attrgroup-{$item.id}" class="hy-hide am-g hy-js-attrgroup  am-margin-top">
							<div class="am-u-sm-1">
							<label for="doc-select-2">{$item.name}</label>
						</div>
						<div class="am-u-sm-11">
							<div class="am-btn-group" data-am-button="">
								{foreach from=$item.value item=val}
								<label class="am-btn am-btn-default am-btn-xs   ">
									<input type="checkbox" class="attr-{$item.id}" name="attr-{$item.id}" value='{$val.name}' data-value='{$val.value}' id="option1"> {$val.name}
								</label>
								
								{/foreach}
							</div>
						</div>
						</div>
							{/foreach}
					</div>
					<div class="am-form-group">
						 <button class="am-btn am-btn-xs hy-js-save">确定</button>
					</div>
                 
				</div>
			</div>
		</div>
		{include file='../Common/hy_footer.html'}
		<script type="text/javascript" src="{$_C.hy_path}js/editor/kindeditor.js"></script>
		<script type="text/javascript">
			$('.hy-js-chooseattr').click(function(){
				var value=$(this).val();
				$('.hy-js-attrgroup').hide();
				for(var key in value)
				{
					id=value[key];
					$('#hy-js-attrgroup-'+id).show();
				}
				
				});
		</script>
	</body>

</html>